<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../css/sousuojieguoye.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1341521_yvtami4tmb.css">
    <title>Document</title>
</head>
<body>
    <header>
        <span class="iconfont icon-fan_hui"></span>
        <div>李子</div>
        <span class="iconfont icon-fangdajing"></span>
        <span class="iconfont icon-gouwuche"></span>
    </header>
    <main>
        <div id="nav">
            <ul>
                <li>销量</li>
                <li>新品</li>
                <li>价格</li>
            </ul>
        </div>
        <div id="cont">
            <ul>
                <li class="goods">
                    <img src="../image/sousuojieguoye.img" alt="">
                    <div class="information">
                        <h3>美国西梅500g</h3>
                        <p>甜中带酸 红到发紫</p>
                        <div class="price">
                            <span>￥69.90</span>
                            <span>5000g/份</span>
                            <span class="add">+</span>
                        </div>
                    </div>
                </li>
                <li class="goods">
                    <img src="../image/sousuojieguoye.img" alt="">
                    <div class="information">
                        <h3>美国西梅500g</h3>
                        <p>甜中带酸 红到发紫</p>
                        <div class="price">
                            <span>￥69.90</span>
                            <span>5000g/份</span>
                            <span class="add">+</span>
                        </div>
                    </div>
                </li>
            </ul>
        </div>

    </main>

    <script src="../js/rem.js"></script>
    <script src="../js/jquery-1.11.3.min.js"></script>
    <script>
       $(".icon-fan_hui").click(function(){
           location.href = "分类.html"
       })
    </script>
    <script>
        //点击商品进入详情页
        let goods = document.querySelectorAll(".goods");
        goods.forEach(v=>{
            v.onclick = function(){
                location.href = "详情.html";
            }
        })
        
        //点击加号加入购物车
        let addBtn = document.querySelectorAll(".add");
        addBtn.forEach(v=>{
            v.addEventListener("click",addToCart)
        })
        let addToCart = function(){
            console.log(1);
        }
    
    </script>
</body>
</html>